---
title: DB-CLL-002 — Insert a new case cost record
summary: Insert a new case cost record
status: draft
owner: SAIF Case Management team
last_reviewed: 2026-08-21
library: SAIF.Business.Claim.Legal
reference_type: embedded
---

# DB-CLL-002 — Insert a new case cost record

## Classification

| Field | Value |
|---|---|
| SQL ID | DB-CLL-002 |
| Operation type | I |
| Execution method | Text |
| Database | Oracle (Case Management) |
| Schema | [unqualified]** |
| Command type | Inline text SQL |
| Business object | clsCaseCost |
| Criteria property | InsertSQL |
| Lifecycle method | BeforeInsert |

## Parameters

| Name | Direction | Type | Default | Description |
|---|---|---|---|---|
| LegalCaseID | Input | NUMBER | N/A | Legal case identifier the cost line belongs to |
| PayeeFirmProvLocID | Input | NUMBER | N/A | Payee firm provider-location identifier |
| PayeePersonProvLocID | Input | NUMBER | N/A | Payee person provider-location identifier |
| ServiceFromDate | Input | DATE | N/A | Start of the billed service period |
| ServiceToDate | Input | DATE | N/A | End of the billed service period |
| ServiceCode | Input | VARCHAR2 | N/A | Code identifying the type of service billed |
| AmountPaid | Input | NUMBER | N/A | Amount paid for the service |
| AuthorizerEmplid | Input | VARCHAR2 | N/A | Employee ID of the person who authorized the cost |
| AuthorizedDate | Input | DATE | N/A | Date the cost was authorized |
| AmountBilled | Input | NUMBER | N/A | Amount billed by the payee |
| PrepaymentFlag | Input | VARCHAR2 | 1 | Indicates the cost is a prepayment |
| CancelledByCode | Input | VARCHAR2 | N/A | Code identifying who cancelled the cost, if cancelled |
| CreateDate | Input | DATE | N/A | Row creation timestamp |
| CreateUser | Input | VARCHAR2 | N/A | User who created the row |
| UpdateDate | Input | DATE | N/A | Row last-update timestamp |
| UpdateUser | Input | VARCHAR2 | N/A | User who last updated the row |
| AmountPerHour | Input | NUMBER | N/A | Hourly billing rate, if applicable |
| HoursBilled | Input | NUMBER | N/A | Number of hours billed |

## Tables

| Table | Access | Columns/Notes |
|---|---|---|
| [CASE_COST](../database-tables.md#case_cost) | INSERT | LEGAL_CASE_SEQ_NUM and 17 non-key columns |

## Sample SQL

```sql
Insert Into CASE_COST (
  LEGAL_CASE_SEQ_NUM,
  PAYEE_FIRM_PROV_LOC_ID,
  PAYEE_PERSON_PROV_LOC_ID,
  SERVICE_FROM_DATE,
  SERVICE_TO_DATE,
  SERVICE_CODE,
  AMOUNT_PAID,
  AUTHORIZER_EMPLID,
  AUTHORIZED_DATE,
  AMOUNT_BILLED,
  PREPAYMENT_FLAG,
  CANCELLED_BY_CODE,
  CREATE_DATE,
  CREATE_USER,
  UPDATE_DATE,
  UPDATE_USER,
  AMOUNT_PER_HOUR,
  HOURS_BILLED)
Values (
  :LegalCaseID,
  :PayeeFirmProvLocID,
  :PayeePersonProvLocID,
  :ServiceFromDate,
  :ServiceToDate,
  :ServiceCode,
  :AmountPaid,
  :AuthorizerEmplid,
  :AuthorizedDate,
  :AmountBilled,
  :PrepaymentFlag,
  :CancelledByCode,
  :CreateDate,
  :CreateUser,
  :UpdateDate,
  :UpdateUser,
  :AmountPerHour,
  :HoursBilled)
```

## Operations and processes

- [Manage case cost entries](../operations/manage-case-cost.md)

## Business rules

- [BR-CLM-LGL-001](../business-rules.md#br-clm-lgl-001-case-cost-date-ranges-must-be-valid)
- [BR-CLM-LGL-002](../business-rules.md#br-clm-lgl-002-case-cost-entry-requires-a-payee)
- [BR-CLM-LGL-003](../business-rules.md#br-clm-lgl-003-case-cost-entry-requires-service-code%2C-authorizer%2C-and-canceller)
- [BR-CLM-LGL-005](../business-rules.md#br-clm-lgl-005-non-single-row-crud-result-is-treated-as-a-failure)

## Sources

- `SAIF.Business.Claim.Legal\LegalNet\clsCaseCost.vb`